﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    Inherits="Nivdal.StadiumPage" Title="" StylesheetTheme="SkinFile"
    CodeBehind="StadiumPage.aspx.cs" %>

<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, StadiumPage_PageNameLabel %>"
        CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="basic_element">
    <asp:Label ID="ErrorLabel" runat="server" Text="" SkinID="ErrorLabel"></asp:Label>
    <asp:FormView ID="StadiumFormView" runat="server" Width="100%" DataSourceID="StadiumPageSqlDataSource">
    <ItemTemplate>
    <div class="red_title">
        <asp:Label ID="StadiumNameLabel" runat="server" Text='<%# Eval("[StadiumName]") %>' CssClass="white_title" />
    </div>
    <div class="padding5">
        
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td colspan="2">
                            
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Image ID="StadiumImage" runat="server" ImageUrl='<%# Eval("ImageName") %>' AlternateText="<%$ Resources:Resource, Global_Stadium %>" />
                </td>
                <td style="vertical-align: top; padding: 10px;">
                    <asp:Label ID="BelongsToLabel" runat="server" Text="<%$ Resources:Resource, StadiumPage_BelongsToLabel %>"
                        SkinID="InfoLabel"></asp:Label>
                    <asp:LinkButton Visible='<%# HasTeam(Eval("TeamId")) %>' ID="CountryNameLabel" runat="server"
                        Text='<%# Eval("[TeamName]") %>' PostBackUrl='<%# Eval("TeamId", "TeamHomePage.aspx?TeamId={0}") %>'
                        SkinID="TitleLink"></asp:LinkButton>
                    <asp:Label ID="TeamNameLabel" runat="server" Visible='<%# !HasTeam(Eval("TeamId")) %>'
                        Text='<%# Eval("[TeamName]") %>' SkinID="GridLabel" />
                    <br />
                    <asp:Label ID="TotalCapacityTitleLabel" runat="server" Text="<%$ Resources:Resource, StadiumPage_CapacityTotal %>" SkinID="InfoLabel"></asp:Label>
                    <asp:Label ID="TotalCapacityLabel" runat="server" SkinID="GridLabel" 
                    Text='<%# FormatNumber((decimal)(Eval("[CapacityBasic]")) + (decimal)(Eval("[CapacityUnderRoof]")) + (decimal)(Eval("CapacityVip"))) %>'></asp:Label>
                    <br />
                    <asp:Label ID="CapacityBasicLabel" runat="server" Text="<%$ Resources:Resource, StadiumPage_CapacityBasicLabel %>"
                        SkinID="InfoLabel"></asp:Label>
                    <asp:Label ID="Label10" runat="server" Text='<%# FormatNumber(Eval("[CapacityBasic]")) %>' SkinID="GridLabel" />
                    <br />
                    <asp:Label ID="CapacityUnderRoofLabel" runat="server" Text="<%$ Resources:Resource, StadiumPage_CapacityUnderRoofLabel %>"
                        SkinID="InfoLabel"></asp:Label>
                    <asp:Label ID="Label13" runat="server" Text='<%# FormatNumber(Eval("[CapacityUnderRoof]")) %>'
                        SkinID="GridLabel" />
                    <br />
                    <asp:Label ID="CapacityVipLabel" runat="server" Text="<%$ Resources:Resource, StadiumPage_CapacityVipLabel %>"
                        SkinID="InfoLabel"></asp:Label>
                    <asp:Label ID="Label15" runat="server" Text='<%# FormatNumber(Eval("CapacityVip")) %>' SkinID="GridLabel" />
                    <br />
                    <br />
                    <asp:Label ID="TicketsCostTitleLabel" runat="server" Text="<%$ Resources:Resource, StadiumPage_TicketsCostTitleLabel %>"
                        SkinID="InfoLabel"></asp:Label>
                    <br />
                    <asp:Label ID="TicketsCostBasicTitleLabel" runat="server" Text='<%# Resources.Resource.Global_BasicSeats + ":"%>'
                        SkinID="InfoLabel"></asp:Label>
                    <asp:Label ID="TicketsCostBasicLabel" runat="server" Text='<%# Eval("TicketsCostBasic") %>'
                        SkinID="GridLabel"></asp:Label>
                    <br />
                    <asp:Label ID="TicketsCostUnderRoofTitleLabel" runat="server" Text='<%# Resources.Resource.Global_UnderRoof+ ":"%>'
                        SkinID="InfoLabel"></asp:Label>
                    <asp:Label ID="TicketsCostUnderRoofLabel" runat="server" Text='<%# Eval("TicketsCostUnderRoof") %>'
                        SkinID="GridLabel"></asp:Label>
                    <br />
                    <asp:Label ID="TicketsCostVipTitleLabel" runat="server" Text="<%$ Resources:Resource, StadiumPage_TicketsCostVipTitleLabel %>"
                        SkinID="InfoLabel"></asp:Label>
                    <asp:Label ID="TicketsCostVipLabel" runat="server" Text='<%# Eval("TicketsCostVip") %>'
                        SkinID="GridLabel"></asp:Label>
                    <asp:Panel ID="RentCostPanel" runat="server" Visible='<%# !HasTeam(Eval("TeamId")) %>'>
                        <asp:Label ID="RentTitleLabel" runat="server" Text="<%$ Resources:Resource, StadiumPage_RentCostTitleLabelText %>"
                            SkinID="InfoLabel"></asp:Label>
                        <asp:Label ID="RentLabel" runat="server" Text='<%# Eval("Rent") %>' SkinID="GridLabel"></asp:Label>
                        <asp:Image ID="AtukImage" runat="server" ImageUrl="~/Images/Icons/atuk.png" ToolTip="<%$ Resources:Resource, Atuks %>" />
                    </asp:Panel>
                </td>
            </tr>
        </table>
        <br />
        <table cellpadding="0" cellspacing="0" style="width: 100%; text-align: center;">
            <tr>
                <td style="width:25%;">
                    <asp:Label ID="WeatherTodayLabel" runat="server" Text="<%$ Resources:Resource, StadiumPage_WeatherTodayLabel %>"
                        SkinID="InfoLabel"></asp:Label>
                </td>
                <td style="width:25%;">
                    <asp:Label ID="TomorrowLabel" runat="server" Text="<%$ Resources:Resource, StadiumPage_TomorrowLabel %>"
                        SkinID="InfoLabel"></asp:Label>
                </td>
                <td style="width:25%;">
                    <asp:Label ID="InTwoDaysLabel" runat="server" Text="<%$ Resources:Resource, StadiumPage_InTwoDaysLabel %>"
                        SkinID="InfoLabel"></asp:Label>
                </td>
                <td style="width:25%;">
                    <asp:Label ID="InThreeDaysLabel" runat="server" Text="<%$ Resources:Resource, StadiumPage_InThreeDaysLabel %>"
                        SkinID="InfoLabel"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Image ID="Image4" ImageUrl='<%# Bind("WeatherTodayIconName") %>' ToolTip='<%# Bind("WeatherToday") %>' AlternateText='<%# Bind("WeatherToday") %>'
                        runat="server" />
                </td>
                <td>
                    <asp:Image ID="Image2" ImageUrl='<%# Bind("WeatherTomorrowIconName") %>' ToolTip='<%# Bind("WeatherTomorrow") %>'  AlternateText='<%# Bind("WeatherTomorrow") %>'
                        runat="server" />
                </td>
                <td>
                    <asp:Image ID="Image5" ImageUrl='<%# Bind("WeatherIn2DaysIconName") %>' ToolTip='<%# Bind("WeatherIn2Days") %>'  AlternateText='<%# Bind("WeatherIn2Days") %>' 
                        runat="server" />
                </td>
                <td>
                    <asp:Image ID="Image1" ImageUrl='<%# Bind("WeatherIn3DaysIconName") %>' ToolTip='<%# Bind("WeatherIn3Days") %>'  AlternateText='<%# Bind("WeatherIn3Days") %>'
                        runat="server" />
                </td>
            </tr>
        </table>
            
        
    
    </div>
    </ItemTemplate>
    </asp:FormView>
    <asp:SqlDataSource ID="StadiumPageSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_ShowStadiumDetails" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <br /><br />
    <asp:LinkButton ID="ManageStadiumLinkButton" runat="server" Text="<%$ Resources:Resource, StadiumPage_ManageStadiumLinkButton %>"
        PostBackUrl="~/ManageStadium.aspx" SkinID="TitleLink"></asp:LinkButton>
    </div>
    <div class="basic_element">
    <div class="red_title">
        <asp:Label ID="StadiumMatchesLabel" runat="server" Text="<%$ Resources:Resource, Global_Matches %>" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
         <asp:GridView ID="StadiumShowListOfMatchesGridView" runat="server" DataSourceID="StadiumShowListOfMatchesSqlDataSource"
            SkinID="SimpleProfessional" AutoGenerateColumns="False" AllowPaging="True" Font-Size="13px"
            EnableTheming="True">
            <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
                Mode="NumericFirstLast" PageButtonCount="10" Position="Bottom" />
            <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
            <Columns>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Date %>" ItemStyle-Width="18%">
                    <ItemTemplate>
                        <asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="4%">
                    <ItemTemplate>
                        <asp:Image ID="MatchTypeImage" runat="server" ImageUrl='<%# GetNivdalData.GetNivdalData.GetIconByMatchType(Eval("Type")) %>' 
                         ToolTip='<%# GetNivdalData.GetNivdalData.GetToolTipByMatchType(Eval("Type")) %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="78%" HeaderText="<%$ Resources:Resource, StadiumPage_UpcomingMatchesLabel %>">
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink2" runat="server" Text='<%# Eval("Title") %>' NavigateUrl='<%# Eval("MatchId", "MatchPage.aspx?MatchId={0}") %>'
                            SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>            
            </Columns>
        </asp:GridView>
        <br />
        <asp:GridView ID="CompletedMatchesGridview" runat="server" DataSourceID="StadiumCompletedMatchesSqlDataSource"
            SkinID="SimpleProfessional" AutoGenerateColumns="False" AllowPaging="false" >
            <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
            <Columns>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Date %>" ItemStyle-Width="18%">
                    <ItemTemplate>
                        <asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="4%">
                    <ItemTemplate>
                        <asp:Image ID="MatchTypeImage" runat="server" ImageUrl='<%# GetNivdalData.GetNivdalData.GetIconByMatchType(Eval("Type")) %>' 
                         ToolTip='<%# GetNivdalData.GetNivdalData.GetToolTipByMatchType(Eval("Type")) %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="40%" HeaderText="<%$ Resources:Resource, Global_CompletedMatches %>">
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink2" runat="server" Text='<%# Eval("Title") %>' NavigateUrl='<%# Eval("MatchId", "MatchPage.aspx?MatchId={0}") %>'
                            SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Result %>" ItemStyle-Width="10%">
                    <ItemTemplate>
                        <asp:Label ID="ResultLabel" runat="server" Text='<%# Eval("Result") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>                                
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="8%">
                    <HeaderTemplate>
                        <asp:Label ID="TotalTitleLabel" runat="server" Text='<%# CutString(Resources.Resource.MatchPage_SpectatorsTitleLabel) %>'
                         ToolTip="<%$ Resources:Resource, MatchPage_SpectatorsTitleLabel %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="TotalLabel" runat="server" Text='<%# FormatNumber(Eval("TotalTickets")) %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>            
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="8%">
                    <HeaderTemplate>
                        <asp:Label ID="BasicSeatsTitleLabel" runat="server" Text='<%# CutString(Resources.Resource.Global_BasicSeats) %>'
                         ToolTip="<%$ Resources:Resource, Global_BasicSeats %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="BasicSeatsLabel" runat="server" Text='<%# FormatNumber(Eval("BasicSeats")) %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>            
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="8%">
                    <HeaderTemplate>
                        <asp:Label ID="UnderRoofTitleLabel" runat="server" Text='<%# CutString(Resources.Resource.Global_UnderRoof) %>'
                         ToolTip="<%$ Resources:Resource, Global_UnderRoof %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="UnderRoofLabel" runat="server" Text='<%# FormatNumber(Eval("UnderRoof")) %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>            
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="8%">
                    <HeaderTemplate>
                        <asp:Label ID="VIPTitleLabel" runat="server" Text='<%# CutString(Resources.Resource.ManageStadium_VipConstructionTitleLabel) %>'
                         ToolTip="<%$ Resources:Resource, ManageStadium_VipConstructionTitleLabel %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="VIPLabel" runat="server" Text='<%# FormatNumber(Eval("VIP")) %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>            
                </asp:TemplateField>
            
            
            

            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="StadiumShowListOfMatchesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_StadiumShowListOfMatches" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="StadiumCompletedMatchesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_StadiumShowListOfCompletedMatches" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
    </div>
    </div>
    
    
   
    
</asp:Content>
